/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package control;

import java.awt.Color;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import model.Stock;

/**
 *
 * @author Allan
 */
public class CustomerStockList extends JPanel
{
    public CustomerStockList(Stock stock)
    {
        setLayout(null);
        setBounds(0, 0, 279, 100);
        setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 1));
        setBackground(Color.LIGHT_GRAY);
        
        JLabel lbl1 = new JLabel("Vare: ");
        JLabel lbl2 = new JLabel("Varegruppe: ");
        JLabel lbl3 = new JLabel("Antal: ");
        
        JLabel lblVare = new JLabel("" + stock.getProduct().getProductName());
        JLabel lblVaregruppe = new JLabel("" + stock.getProduct().getProductGroup().getGroupName());
        JLabel lblAntal = new JLabel("" + stock.getAmount());
        
        lbl1.setBounds(5, 5, 70, 14);
        lbl2.setBounds(5, 25, 70, 14);
        lbl3.setBounds(5, 45, 70, 14);
        
        lblVare.setBounds(75, 5, 180, 14);
        lblVaregruppe.setBounds(75, 25, 180, 14);
        lblAntal.setBounds(75, 45, 80, 14);
        
        add(lbl1);
        add(lbl2);
        add(lbl3);
        add(lblVare);
        add(lblVaregruppe);
        add(lblAntal);
    }
}
